package work;

import java.util.HashMap;

import tool.LCMCReader;

public class Main {
	static HashMap<String, String> TrainingSet;
	static HashMap<String, String> LCMCSet;
	static final String TrainingFile = "TrainingData.txt";
	static final String TestFile = "SampleTestData.txt";
	static final String ResultFile = "result.xml";
	static final String MarkedInput = "MarkedTestCorpus.txt";

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		Training train = new Training();
		train.readTrainingFile(TrainingFile);
		// train.printTrainingResult();
		TrainingSet = train.hashTable;
		LCMCReader.resolveData(null);
		LCMCSet = LCMCReader.words;
		XmlGenerator xml_generator = new XmlGenerator();
		TestCase tc = new TestCase(TrainingSet, LCMCSet, xml_generator);
		tc.process(TestFile);
		RelationExtractor re = new RelationExtractor(TrainingSet, LCMCSet, xml_generator);
		re.extract(TestFile, MarkedInput);
		xml_generator.saveXml(ResultFile);
	}

}
